package com.dxy.md;

import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

// 注意此处需要排除DataSourceAutoConfiguration、MybatisAutoConfiguration，不然springboot会创建默认的DataSource和SqlSessionFactory
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MybatisAutoConfiguration.class})
public class DynamicDatasourceApp2 {
    public static void main(String[] args) {
        SpringApplication.run(DynamicDatasourceApp2.class, args);
    }
}